\(\int \frac {(a+b \arctan (c x))^3}{x^2} \, dx\) [31]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F(-1)]
   Mupad [F(-1)]

Optimal result

Integrand size = 14, antiderivative size = 116 \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=-i c (a+b \arctan (c x))^3-\frac {(a+b \arctan (c x))^3}{x}+3 b c (a+b \arctan (c x))^2 \log \left (2-\frac {2}{1-i c x}\right )-3 i b^2 c (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1-i c x}\right )+\frac {3}{2} b^3 c \operatorname {PolyLog}\left (3,-1+\frac {2}{1-i c x}\right ) \]

[Out]

-I*c*(a+b*arctan(c*x))^3-(a+b*arctan(c*x))^3/x+3*b*c*(a+b*arctan(c*x))^2*ln(2-2/(1-I*c*x))-3*I*b^2*c*(a+b*arct
an(c*x))*polylog(2,-1+2/(1-I*c*x))+3/2*b^3*c*polylog(3,-1+2/(1-I*c*x))

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4946, 5044, 4988, 5004, 5112, 6745} \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=-3 i b^2 c \operatorname {PolyLog}\left (2,\frac {2}{1-i c x}-1\right ) (a+b \arctan (c x))-i c (a+b \arctan (c x))^3-\frac {(a+b \arctan (c x))^3}{x}+3 b c \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))^2+\frac {3}{2} b^3 c \operatorname {PolyLog}\left (3,\frac {2}{1-i c x}-1\right ) \]

[In]

Int[(a + b*ArcTan[c*x])^3/x^2,x]

[Out]

(-I)*c*(a + b*ArcTan[c*x])^3 - (a + b*ArcTan[c*x])^3/x + 3*b*c*(a + b*ArcTan[c*x])^2*Log[2 - 2/(1 - I*c*x)] -
(3*I)*b^2*c*(a + b*ArcTan[c*x])*PolyLog[2, -1 + 2/(1 - I*c*x)] + (3*b^3*c*PolyLog[3, -1 + 2/(1 - I*c*x)])/2

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 4988

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Simp[(a + b*ArcTan[c*x])
^p*(Log[2 - 2/(1 + e*(x/d))]/d), x] - Dist[b*c*(p/d), Int[(a + b*ArcTan[c*x])^(p - 1)*(Log[2 - 2/(1 + e*(x/d))
]/(1 + c^2*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 5004

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 5044

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^2)), x_Symbol] :> Simp[(-I)*((a + b*ArcT
an[c*x])^(p + 1)/(b*d*(p + 1))), x] + Dist[I/d, Int[(a + b*ArcTan[c*x])^p/(x*(I + c*x)), x], x] /; FreeQ[{a, b
, c, d, e}, x] && EqQ[e, c^2*d] && GtQ[p, 0]

Rule 5112

Int[(Log[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[I*(a + b*ArcTa
n[c*x])^p*(PolyLog[2, 1 - u]/(2*c*d)), x] - Dist[b*p*(I/2), Int[(a + b*ArcTan[c*x])^(p - 1)*(PolyLog[2, 1 - u]
/(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[(1 - u)^2 - (1 - 2*(I
/(I + c*x)))^2, 0]

Rule 6745

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {(a+b \arctan (c x))^3}{x}+(3 b c) \int \frac {(a+b \arctan (c x))^2}{x \left (1+c^2 x^2\right )} \, dx \\ & = -i c (a+b \arctan (c x))^3-\frac {(a+b \arctan (c x))^3}{x}+(3 i b c) \int \frac {(a+b \arctan (c x))^2}{x (i+c x)} \, dx \\ & = -i c (a+b \arctan (c x))^3-\frac {(a+b \arctan (c x))^3}{x}+3 b c (a+b \arctan (c x))^2 \log \left (2-\frac {2}{1-i c x}\right )-\left (6 b^2 c^2\right ) \int \frac {(a+b \arctan (c x)) \log \left (2-\frac {2}{1-i c x}\right )}{1+c^2 x^2} \, dx \\ & = -i c (a+b \arctan (c x))^3-\frac {(a+b \arctan (c x))^3}{x}+3 b c (a+b \arctan (c x))^2 \log \left (2-\frac {2}{1-i c x}\right )-3 i b^2 c (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1-i c x}\right )+\left (3 i b^3 c^2\right ) \int \frac {\operatorname {PolyLog}\left (2,-1+\frac {2}{1-i c x}\right )}{1+c^2 x^2} \, dx \\ & = -i c (a+b \arctan (c x))^3-\frac {(a+b \arctan (c x))^3}{x}+3 b c (a+b \arctan (c x))^2 \log \left (2-\frac {2}{1-i c x}\right )-3 i b^2 c (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1-i c x}\right )+\frac {3}{2} b^3 c \operatorname {PolyLog}\left (3,-1+\frac {2}{1-i c x}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 1.30 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.84 \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=-\frac {a^3}{x}-\frac {3 a^2 b \arctan (c x)}{x}+3 a^2 b c \log (x)-\frac {3}{2} a^2 b c \log \left (1+c^2 x^2\right )+3 a b^2 c \left (-\frac {\arctan (c x)^2}{c x}+2 \arctan (c x) \log \left (1-e^{2 i \arctan (c x)}\right )-i \left (\arctan (c x)^2+\operatorname {PolyLog}\left (2,e^{2 i \arctan (c x)}\right )\right )\right )+b^3 c \left (-\frac {i \pi ^3}{8}+i \arctan (c x)^3-\frac {\arctan (c x)^3}{c x}+3 \arctan (c x)^2 \log \left (1-e^{-2 i \arctan (c x)}\right )+3 i \arctan (c x) \operatorname {PolyLog}\left (2,e^{-2 i \arctan (c x)}\right )+\frac {3}{2} \operatorname {PolyLog}\left (3,e^{-2 i \arctan (c x)}\right )\right ) \]

[In]

Integrate[(a + b*ArcTan[c*x])^3/x^2,x]

[Out]

-(a^3/x) - (3*a^2*b*ArcTan[c*x])/x + 3*a^2*b*c*Log[x] - (3*a^2*b*c*Log[1 + c^2*x^2])/2 + 3*a*b^2*c*(-(ArcTan[c
*x]^2/(c*x)) + 2*ArcTan[c*x]*Log[1 - E^((2*I)*ArcTan[c*x])] - I*(ArcTan[c*x]^2 + PolyLog[2, E^((2*I)*ArcTan[c*
x])])) + b^3*c*((-1/8*I)*Pi^3 + I*ArcTan[c*x]^3 - ArcTan[c*x]^3/(c*x) + 3*ArcTan[c*x]^2*Log[1 - E^((-2*I)*ArcT
an[c*x])] + (3*I)*ArcTan[c*x]*PolyLog[2, E^((-2*I)*ArcTan[c*x])] + (3*PolyLog[3, E^((-2*I)*ArcTan[c*x])])/2)

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.91 (sec) , antiderivative size = 1862, normalized size of antiderivative = 16.05

\[\text {Expression too large to display}\]

[In]

int((a+b*arctan(c*x))^3/x^2,x)

[Out]

c*(-a^3/c/x+b^3*(-1/c/x*arctan(c*x)^3+3*ln(c*x)*arctan(c*x)^2-3/2*arctan(c*x)^2*ln(c^2*x^2+1)+3*arctan(c*x)^2*
ln((1+I*c*x)/(c^2*x^2+1)^(1/2))-3*arctan(c*x)^2*ln((1+I*c*x)^2/(c^2*x^2+1)-1)-I*arctan(c*x)^3+3/4*(I*Pi*csgn(I
*(1+I*c*x)^2/(c^2*x^2+1))*csgn(I*(1+I*c*x)^2/(c^2*x^2+1)/(1+(1+I*c*x)^2/(c^2*x^2+1))^2)^2-2*I*Pi*csgn(((1+I*c*
x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^2-I*Pi*csgn(I*(1+I*c*x)/(c^2*x^2+1)^(1/2))^2*csgn(I*(1+I*c*x)
^2/(c^2*x^2+1))-2*I*Pi*csgn(I*(1+(1+I*c*x)^2/(c^2*x^2+1)))*csgn(I*(1+(1+I*c*x)^2/(c^2*x^2+1))^2)^2+I*Pi*csgn(I
/(1+(1+I*c*x)^2/(c^2*x^2+1))^2)*csgn(I*(1+I*c*x)^2/(c^2*x^2+1)/(1+(1+I*c*x)^2/(c^2*x^2+1))^2)^2+2*I*Pi*csgn(I*
((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^3-2*I*Pi*csgn(I*((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c
*x)^2/(c^2*x^2+1)))*csgn(((1+I*c*x)^2/(c^2*x^2+1)-1)/(1+(1+I*c*x)^2/(c^2*x^2+1)))^2+I*Pi*csgn(I*(1+(1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(c^2*x^2+1)^(1/2))-6*I*arctan(c*x)*polylog(2,(1+I*c*
x)/(c^2*x^2+1)^(1/2))+6*polylog(3,(1+I*c*x)/(c^2*x^2+1)^(1/2))+3*arctan(c*x)^2*ln(1+(1+I*c*x)/(c^2*x^2+1)^(1/2
))-6*I*arctan(c*x)*polylog(2,-(1+I*c*x)/(c^2*x^2+1)^(1/2))+6*polylog(3,-(1+I*c*x)/(c^2*x^2+1)^(1/2)))+3*a*b^2*
(-arctan(c*x)^2/c/x+2*ln(c*x)*arctan(c*x)-arctan(c*x)*ln(c^2*x^2+1)+I*ln(c*x)*ln(1+I*c*x)-I*ln(c*x)*ln(1-I*c*x
)+I*dilog(1+I*c*x)-I*dilog(1-I*c*x)-1/2*I*(ln(c*x-I)*ln(c^2*x^2+1)-1/2*ln(c*x-I)^2-dilog(-1/2*I*(c*x+I))-ln(c*
x-I)*ln(-1/2*I*(c*x+I)))+1/2*I*(ln(c*x+I)*ln(c^2*x^2+1)-1/2*ln(c*x+I)^2-dilog(1/2*I*(c*x-I))-ln(c*x+I)*ln(1/2*
I*(c*x-I))))+3*a^2*b*(-1/c/x*arctan(c*x)+ln(c*x)-1/2*ln(c^2*x^2+1)))

Fricas [F]

\[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{3}}{x^{2}} \,d x } \]

[In]

integrate((a+b*arctan(c*x))^3/x^2,x, algorithm="fricas")

[Out]

integral((b^3*arctan(c*x)^3 + 3*a*b^2*arctan(c*x)^2 + 3*a^2*b*arctan(c*x) + a^3)/x^2, x)

Sympy [F]

\[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right )^{3}}{x^{2}}\, dx \]

[In]

integrate((a+b*atan(c*x))**3/x**2,x)

[Out]

Integral((a + b*atan(c*x))**3/x**2, x)

Maxima [F]

\[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{3}}{x^{2}} \,d x } \]

[In]

integrate((a+b*arctan(c*x))^3/x^2,x, algorithm="maxima")

[Out]

-3/2*(c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*a^2*b - a^3/x - 1/32*(4*b^3*arctan(c*x)^3 - 3*b^3*arc
tan(c*x)*log(c^2*x^2 + 1)^2 - (7*b^3*c*arctan(c*x)^4 + 32*a*b^2*c*arctan(c*x)^3 + 96*b^3*c^2*integrate(1/32*x^
2*arctan(c*x)*log(c^2*x^2 + 1)^2/(c^2*x^4 + x^2), x) - 384*b^3*c^2*integrate(1/32*x^2*arctan(c*x)*log(c^2*x^2
+ 1)/(c^2*x^4 + x^2), x) + 384*b^3*c*integrate(1/32*x*arctan(c*x)^2/(c^2*x^4 + x^2), x) - 96*b^3*c*integrate(1
/32*x*log(c^2*x^2 + 1)^2/(c^2*x^4 + x^2), x) + 896*b^3*integrate(1/32*arctan(c*x)^3/(c^2*x^4 + x^2), x) + 96*b
^3*integrate(1/32*arctan(c*x)*log(c^2*x^2 + 1)^2/(c^2*x^4 + x^2), x) + 3072*a*b^2*integrate(1/32*arctan(c*x)^2
/(c^2*x^4 + x^2), x))*x)/x

Giac [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\text {Timed out} \]

[In]

integrate((a+b*arctan(c*x))^3/x^2,x, algorithm="giac")

[Out]

Timed out

Mupad [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x))^3}{x^2} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^3}{x^2} \,d x \]

[In]

int((a + b*atan(c*x))^3/x^2,x)

[Out]

int((a + b*atan(c*x))^3/x^2, x)